<template>
	<view>
		<u-navbar
		     leftText="返回"
		     :title="title"
		     :safeAreaInsetTop="false"
		 >
		     <view
		         class="u-nav-slot"
		         slot="left"
				 @click="leftclick"
		     >
		         <u-icon
		             :name="namecar"
		             size="19"
		         ></u-icon>
		        <text>{{leftTitle}}</text>
		     </view>
			
				<view 
					slot="right">
					 <view  class="u-nav-slot" v-if="rightslot">
					<u-icon
						name="search"
						size="19"
					></u-icon>
					<u-line direction="col" length="20px" margin="10rpx"></u-line>
				   <u-icon
					   name="list-dot"
					   size="19"
					   @click='clickfilter'
				   ></u-icon>
				</view>
				</view>
		 </u-navbar>
		 

	</view>
</template>

<script>
	export default {
		name:"Nav",
		props:['leftTitle','namecar','title','rightslot'],
		data() {
			return {
				
			};
		},
		methods:{
			clickfilter(){
				this.$emit('clickfilter')
			},
			leftclick(){
				this.$emit('leftclick')
			}
		}
	}
</script>

<style lang="scss">
.u-nav-slot{
	display: flex;
	align-items: center;
}
</style>